Optimal. Leaf size=75 \[ \frac {1}{2} b^2 e^{i a} x^m (-i b x)^{-m} \text {Gamma}(-2+m,-i b x)+\frac {1}{2} b^2 e^{-i a} x^m (i b x)^{-m} \text {Gamma}(-2+m,i b x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3388, 2212}
\begin {gather*} \frac {1}{2} e^{i a} b^2 x^m (-i b x)^{-m} \text {Gamma}(m-2,-i b x)+\frac {1}{2} e^{-i a} b^2 x^m (i b x)^{-m} \text {Gamma}(m-2,i b x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2212
Rule 3388
Rubi steps
\begin {align*} \int x^{-3+m} \cos (a+b x) \, dx &=\frac {1}{2} \int e^{-i (a+b x)} x^{-3+m} \, dx+\frac {1}{2} \int e^{i (a+b x)} x^{-3+m} \, dx\\ &=\frac {1}{2} b^2 e^{i a} x^m (-i b x)^{-m} \Gamma (-2+m,-i b x)+\frac {1}{2} b^2 e^{-i a} x^m (i b x)^{-m} \Gamma (-2+m,i b x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 75, normalized size = 1.00 \begin {gather*} \frac {1}{2} b^2 e^{i a} x^m (-i b x)^{-m} \text {Gamma}(-2+m,-i b x)+\frac {1}{2} b^2 e^{-i a} x^m (i b x)^{-m} \text {Gamma}(-2+m,i b x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.09, size = 600, normalized size = 8.00
method | result | size |
meijerg | \(2^{-3+m} b^{2} \left (b^{2}\right )^{-\frac {m}{2}} \sqrt {\pi }\, \left (\frac {2^{2-m} x^{-3+m} \left (b^{2}\right )^{\frac {m}{2}} \left (-2 x^{4} b^{4}+2 x^{2} b^{2} m^{2}+2 x^{2} b^{2} m -4 x^{2} b^{2}+2 m^{3}+2 m^{2}-4 m \right ) \sin \left (b x \right )}{\sqrt {\pi }\, \left (-2+m \right ) b^{3} m \left (2+m \right ) \left (-1+m \right )}-\frac {2^{-m +3} x^{-3+m} \left (b^{2}\right )^{\frac {m}{2}} \left (x^{2} b^{2}-m^{2}+m \right ) \left (\cos \left (b x \right ) x b -\sin \left (b x \right )\right )}{\sqrt {\pi }\, \left (-2+m \right ) b^{3} m \left (-1+m \right )}+\frac {2^{-m +3} x^{2+m} b^{2} \left (b^{2}\right )^{\frac {m}{2}} \left (b x \right )^{-\frac {3}{2}-m} \LommelS 1 \left (m +\frac {3}{2}, \frac {3}{2}, b x \right ) \sin \left (b x \right )}{\sqrt {\pi }\, \left (-2+m \right ) m \left (2+m \right ) \left (-1+m \right )}+\frac {2^{-m +3} x^{2+m} b^{2} \left (b^{2}\right )^{\frac {m}{2}} \left (b x \right )^{-\frac {5}{2}-m} \left (\cos \left (b x \right ) x b -\sin \left (b x \right )\right ) \LommelS 1 \left (m +\frac {1}{2}, \frac {1}{2}, b x \right )}{\sqrt {\pi }\, \left (-2+m \right ) m \left (-1+m \right )}\right ) \cos \left (a \right )-2^{-3+m} b^{2-m} \sqrt {\pi }\, \left (\frac {2^{2-m} x^{-2+m} b^{-2+m} \left (-2 x^{2} b^{2}+2 m^{2}-2 m -4\right ) \sin \left (b x \right )}{\sqrt {\pi }\, \left (-1+m \right ) \left (1+m \right ) \left (-2+m \right )}+\frac {2^{-m +3} x^{-2+m} b^{-2+m} \left (x^{2} b^{2}-m^{2}-m \right ) \left (\cos \left (b x \right ) x b -\sin \left (b x \right )\right )}{\sqrt {\pi }\, \left (-1+m \right ) \left (1+m \right ) \left (-2+m \right ) m}+\frac {2^{-m +3} x^{2+m} b^{2+m} \left (b x \right )^{-\frac {3}{2}-m} \LommelS 1 \left (m +\frac {1}{2}, \frac {3}{2}, b x \right ) \sin \left (b x \right )}{\sqrt {\pi }\, \left (-1+m \right ) \left (1+m \right ) \left (-2+m \right )}-\frac {2^{-m +3} x^{2+m} b^{2+m} \left (b x \right )^{-\frac {5}{2}-m} \left (\cos \left (b x \right ) x b -\sin \left (b x \right )\right ) \LommelS 1 \left (m +\frac {3}{2}, \frac {1}{2}, b x \right )}{\sqrt {\pi }\, \left (-1+m \right ) \left (1+m \right ) \left (-2+m \right ) m}\right ) \sin \left (a \right )\) | \(600\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.09, size = 54, normalized size = 0.72 \begin {gather*} \frac {i \, e^{\left (-{\left (m - 3\right )} \log \left (i \, b\right ) - i \, a\right )} \Gamma \left (m - 2, i \, b x\right ) - i \, e^{\left (-{\left (m - 3\right )} \log \left (-i \, b\right ) + i \, a\right )} \Gamma \left (m - 2, -i \, b x\right )}{2 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{m - 3} \cos {\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^{m-3}\,\cos \left (a+b\,x\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________